/*
 * @FilePath     : /clock/components/drivers/include/ST7735S.h
 * @Author       : Ma Xiaowei
 * @Date         : 2020-08-11 09:19
 * @LastEditTime : 2020-08-12 16:12
 * @LastEditors  : Ma Xiaowei
 * @Description  : ST7735S驱动IC
 * SPI2  Pin  | GPIO | LCD
 *       CS0  |  15  | CS
 *       SCLK |  14  | SCL
 *       MOSI |  13  | SDA
 *            |  0   | RST
 *            |  4   | DC(DATA-1/COMMAND-0)
 *            |  2   | BLK
 */
#ifndef __ST7735S_H__
#define __ST7735S_H__

#include "driver/spi_master.h"
#include "driver/gpio.h"

#define LCD_HOST    HSPI_HOST
#define DMA_CHAN    2

// #define PIN_NUM_MISO 25 /* 没有读取引脚 */
#define PIN_NUM_MOSI 13
#define PIN_NUM_CLK  14
#define PIN_NUM_CS   15

#define PIN_NUM_DC   4
#define PIN_NUM_RST  0
#define PIN_NUM_BCKL 2


void st_init(void);
void st_set_region(uint16_t xs, uint16_t xe, uint16_t ys, uint16_t ye);
#endif